const { defineConfig } = require('@vue/cli-service');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const port = process.env.port || process.env.npm_config_port || 80 // 端口
module.exports = defineConfig({
  lintOnSave: false,
  transpileDependencies: true,
  assetsDir: 'static',
  devServer: {
    host: '0.0.0.0',
    port: port,
    open: true,
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        target: process.env.VUE_APP_URL,
        changeOrigin: true,
        pathRewrite: {
          ['^' + process.env.VUE_APP_BASE_API]: ''
        }
      }
    },
    allowedHosts: ['*']
  },
})
